@@ -37,7 +37,6 @@ public class MainActivity extends BaseActivity implements MainContract.View { |
||
37 | 37 |
@BindView(R.id.iv_box_status) ImageView boxStatusImageView; |
38 | 38 |
@BindView(R.id.icon_no_data) View noDataLayout; |
39 | 39 |
@BindView(R.id.iv_add_session) ImageView addSessionBtn; |
40 |
- @BindView(R.id.container_view) View containerView; |
|
41 | 40 |
@BindView(R.id.recycler_view_sessions) RecyclerView sessionsRecyclerView; |
42 | 41 |
@BindView(R.id.sync_time_view) RelativeLayout syncTimeView; |
43 | 42 |
@BindView(R.id.loading_gear_view) LoadingView loadingView; |
@@ -97,7 +96,7 @@ public class MainActivity extends BaseActivity implements MainContract.View { |
||
97 | 96 |
} |
98 | 97 |
|
99 | 98 |
@OnClick(R.id.iv_upload_manage) |
100 |
- void jumpToUploadManage(){ |
|
99 |
+ void jumpToUploadManagePage(){ |
|
101 | 100 |
startActivity(new Intent(this, UploadActivity.class)); |
102 | 101 |
} |
103 | 102 |
|
@@ -169,7 +168,6 @@ public class MainActivity extends BaseActivity implements MainContract.View { |
||
169 | 168 |
if(strId!=0){ |
170 | 169 |
syncStatusTextView.setText(strId); |
171 | 170 |
} |
172 |
- |
|
173 | 171 |
} |
174 | 172 |
|
175 | 173 |
private void jumpToSelectedSession(SessionBean sessionBean) { |
@@ -6,6 +6,7 @@ import android.support.annotation.StringRes; |
||
6 | 6 |
|
7 | 7 |
import com.android.common.executors.ThreadExecutor; |
8 | 8 |
import com.android.common.http.HttpUtils; |
9 |
+import com.android.common.utils.LogHelper; |
|
9 | 10 |
|
10 | 11 |
import org.json.JSONObject; |
11 | 12 |
|
@@ -47,13 +48,14 @@ public class SyncTimeInteractor implements BaseInteractor { |
||
47 | 48 |
listener.onTimeSync(false,R.string.sync_time_box_error); |
48 | 49 |
} |
49 | 50 |
} |
50 |
- |
|
51 |
+ LogHelper.d("czy","开始时间同步任务"); |
|
51 | 52 |
timeSyncTask = new HttpPostTask(params){ |
52 | 53 |
|
53 | 54 |
int msgId = R.string.sync_time_box_error; |
54 | 55 |
|
55 | 56 |
@Override |
56 | 57 |
protected boolean parseResponse(String response) { |
58 |
+ LogHelper.d("czy","时间同步任务 服务器应答="+response); |
|
57 | 59 |
try{ |
58 | 60 |
JSONObject json = new JSONObject(response); |
59 | 61 |
int status = json.getInt("status"); |
@@ -65,7 +67,8 @@ public class SyncTimeInteractor implements BaseInteractor { |
||
65 | 67 |
if(isCancelled){ |
66 | 68 |
return false; |
67 | 69 |
} |
68 |
- HttpUtils.doHttpPost(BoxUrlContainer.SET_TIME_URL,boxParams); |
|
70 |
+ String setTimeResp = HttpUtils.doHttpPost(BoxUrlContainer.SET_TIME_URL,boxParams); |
|
71 |
+ LogHelper.d("czy","时间同步任务 box设置时间应答="+setTimeResp); |
|
69 | 72 |
if(isCancelled){ |
70 | 73 |
return false; |
71 | 74 |
} |
@@ -74,6 +77,7 @@ public class SyncTimeInteractor implements BaseInteractor { |
||
74 | 77 |
return false; |
75 | 78 |
} |
76 | 79 |
String boxResp = HttpUtils.doHttpPost(BoxUrlContainer.BOX_TIME_URL,null); |
80 |
+ LogHelper.d("czy","时间同步任务 box获取时间应答="+boxResp); |
|
77 | 81 |
if(isCancelled){ |
78 | 82 |
return false; |
79 | 83 |
} |
@@ -89,7 +93,7 @@ public class SyncTimeInteractor implements BaseInteractor { |
||
89 | 93 |
msgId = R.string.sync_time_server_error; |
90 | 94 |
} |
91 | 95 |
}catch (Exception e){ |
92 |
- e.printStackTrace(); |
|
96 |
+ LogHelper.e("czy","时间同步任务发生异常="+e); |
|
93 | 97 |
} |
94 | 98 |
return false; |
95 | 99 |
} |
@@ -98,12 +102,14 @@ public class SyncTimeInteractor implements BaseInteractor { |
||
98 | 102 |
protected void onPostFail() { |
99 | 103 |
super.onPostFail(); |
100 | 104 |
listener.onTimeSync(false,msgId); |
105 |
+ LogHelper.d("czy","时间同步失败"); |
|
101 | 106 |
} |
102 | 107 |
|
103 | 108 |
@Override |
104 | 109 |
protected void onPostSuccess() { |
105 | 110 |
super.onPostSuccess(); |
106 | 111 |
listener.onTimeSync(true,0); |
112 |
+ LogHelper.d("czy","时间同步成功"); |
|
107 | 113 |
} |
108 | 114 |
}; |
109 | 115 |
timeSyncTask.executeOnExecutor(ThreadExecutor.getInstance().getExecutor(), UrlContainer.SERVER_TIME_URL); |
@@ -5,7 +5,7 @@ buildscript { |
||
5 | 5 |
jcenter() |
6 | 6 |
} |
7 | 7 |
dependencies { |
8 |
- classpath 'com.android.tools.build:gradle:2.3.0' |
|
8 |
+ classpath 'com.android.tools.build:gradle:2.3.1' |
|
9 | 9 |
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' |
10 | 10 |
// NOTE: Do not place your application dependencies here; they belong |
11 | 11 |
// in the individual module build.gradle files |